package com.ljx.autoConfig;


import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author LJX
 * @Description: TODO
 * @Date: 2022/11/17 14:54
 * @Version 1.0
 * springBoot中提供了两种读取配置文件内容的方式
 * 这是第一种：把读取的配置文件内容封装到实体类中
 * 定义该类为属性配置类（用来解析springboot配置文件中提供的内容）
 */
@ConfigurationProperties(prefix = "lix")
public class LjxProperties {
	private String name;
	private String address;
	private Integer age;

	public LjxProperties(String name, String address, Integer age) {
		this.name = name;
		this.address = address;
		this.age = age;
	}

	public LjxProperties() {
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}
}
